﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Threading;
using System.Globalization;
using NazSoft.Framework;
using BCL.Entity.Generic.DAL;

public partial class Results : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected override void InitializeCulture()
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        if (TextBox3.Text != "")
        {
            ResultsShowGenericDAL dal = new ResultsShowGenericDAL();
            var result = dal.Get(new BCL.Entity.Entity.ResultsShow() { Result_TypeID = Convert.ToInt32(DropDownList1.SelectedItem.Value), RollNo = TextBox3.Text });

            Page.Title = DropDownList1.SelectedItem.Text + " - roll number " + TextBox3.Text;

            if (result == null)
            {
                lblMsges.Text = "Sorry : Our system is unable to find your roll number, it might be due to the following reasons :";
                lblMsges.Text = lblMsges.Text.ToString() + "<br />* You have inserted wrong roll number. <br />* Your result has been withheld by the Board";
                //* Your result has been withheld by the Board
                lblMsges.Visible = true;
            }
            else
            {
                lblMsges.Visible = true;
                lblMsges.Text = result.DisplayText;
            }
            //  * You have inserted wrong roll number.
            //* Your result has been withheld by the Board.




        }
    }
}
